<?php
/**
 # com_jvframwork - JV Framework
 # @version		1.5.x
 # ------------------------------------------------------------------------
 # author    Open Source Code Solutions Co
 # copyright Copyright (C) 2011 joomlavi.com. All Rights Reserved.
 # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL or later.
 # Websites: http://www.joomlavi.com
 # Technical Support:  http://www.joomlavi.com/my-tickets.html
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');


require_once (JPATH_COMPONENT . DS . 'libraries' . DS .'import.php');   
require_once (JPATH_COMPONENT . DS . 'libraries' . DS .'defines.php');                          #Require defined const
require_once (JPATH_COMPONENT . DS . 'helpers' . DS . 'controller.php');    #Require the base controller
require_once (JPATH_COMPONENT . DS . 'helpers' . DS . 'model.php');         #Require the base model

// Require specific controller if requested
$controller = JRequest::getWord('c') ? JRequest::getWord('c') : 'default';
$path = JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php';

if (file_exists($path)) {
        require_once $path;
}
// Create the controller
$classname = CONTROLLER_PREFIX . $controller;
$controller = new $classname();

$controller->execute(JRequest::getVar('task'));
// Redirect if set by the controller
$controller->redirect();
